﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Jayrock.Json;
using BLL;

namespace gosillk.Class
{
	public partial class insertBusiness : System.Web.UI.Page
	{
		protected void Page_Load(object sender, EventArgs e)
		{
            string businessName = Request["businessName"].ToString();
            string name = Request["name"].ToString();
            string city = Request["city"].ToString();

            BusinessManager mgr = new BusinessManager();
            Int32 rlt = mgr.InsertBusiness(name, businessName, city);

            JsonObject jObj = new JsonObject();
            if (rlt > 0)
            {
                jObj["result"] = rlt;
            }
            else
            {
                jObj["result"] = 0;
            }

            Response.Write(jObj);
		}
	}
}